<? 
$dbname = 'tcntrans_main';
$dbhost = 'localhost';
$dbuser = 'tcntrans';
$dbpass = 'hJV65VUX';
$db = mysql_connect($dbhost,$dbuser,$dbpass);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html>
<head>
	<title>New document</title>
<meta name="generator" content="TSW WebCoder">
</head>

<body>
<h1>Parse the Dictionary</h1>
<?
// Open the dictionary file and read line by line
$i=0;
$handle = @fopen("englishDictionary.txt", "r");
if ($handle) {
   while (!feof($handle)) {
       $buffer = fgets($handle, 4096);
       echo $buffer.'<br />';
       // Insert into database
       $sql = "INSERT into dictionary (Word) values ($buffer)";
       $result = mysql_db_query($dbname,$sql);
       $i++;
   }
   fclose($handle);
}
echo "<b>$i Words</b>";
?>

</body>
</html>